package com.legendframework.dao.wrapper.defaults;

import com.legendframework.dao.wrapper.enums.Operator;

import java.util.Arrays;
import java.util.List;

/**
 * 普通的条件结果
 */
public class WrapperResult {

    /**
     * 条件类型
     */
    private Operator operator;

    /**
     * 嵌套条件
     */
    private List<WrapperResult> wrapperResults;

    /**
     * 字段名
     */
    private String column;

    /**
     * 值数组
     */
    private Object[] vals;

    public Operator getOperator() {
        return operator;
    }

    public void setOperator(Operator operator) {
        this.operator = operator;
    }

    public String getColumn() {
        return column;
    }

    public void setColumn(String column) {
        this.column = column;
    }

    public Object[] getVals() {
        return vals;
    }

    public void setVals(Object[] vals) {
        this.vals = vals;
    }

    public List<WrapperResult> getWrapperResults() {
        return wrapperResults;
    }

    public void setWrapperResults(List<WrapperResult> wrapperResults) {
        this.wrapperResults = wrapperResults;
    }

    @Override
    public String toString() {
        return "WrapperResult{" +
                "operator=" + operator +
                ", wrapperResults=" + wrapperResults +
                ", column='" + column + '\'' +
                ", vals=" + Arrays.toString(vals) +
                '}';
    }
}
